import {
    RouteRecordRaw,
    Router,
    createRouter,
    createWebHistory,
    createWebHashHistory,
  } from "vue-router";
  let routes: RouteRecordRaw[] = [
    
    {
        path: "/",
        redirect: '/home',
      },
    {
      path: "/home",
      name: "Home",
      component: () => import("@/views/main/Home.vue"),
    },
  ];
  console.log(routes)
  // 路由实例
  // history
  // const router: Router = createRouter({ history: createWebHistory(), routes });
  // hash #
  const router: Router = createRouter({
    history: createWebHashHistory(),
    routes,
  });
  
  export default router;
  